﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

using Bricks.Component.Utils;
using Bricks.Site.Models;
using Bricks.Business.Models.ExpenseManagement;
using Bricks.Business.Models.ProjectContract;
using Bricks.Site.Models.DBViewModel.Expense;


namespace Bricks.Business.Service
{
    public interface IExpenseService
    {
        ExpenseView GetExpenseByID(string expenseID);

        List<ConstructionContractEstimateView> GetConstructionContractEstimateList(Guid contractID, Guid expenseID);

        List<ConstructionContractEepenseBillView> GetBillList(Guid expenseID);

        ExpenseView GetExpenseBackupByID(Guid id);

        ExpenseView GetExpenseBackupByExpenseID(string expenseID);

        ExpenseView GetExpenseBackupByCondition(string expenseID, string nodeCode, string department, string userName);

        List<ConstructionContractEstimateView> GetConstructionContractEstimateBackupList(Guid contractID, Guid expenseID, string nodeCode, string department, string userName);

        List<ConstructionContractEepenseBillView> GetBillBackupList(Guid expenseID, string nodeCode, string department, string userName);

        bool IsPassMoneyForCommonContractExpense(Guid contractID, Guid expenseID, decimal? approvalMoney);

        void SaveExpense(ExpenseView expenseView, List<ConstructionContractEepenseBillView> saveList);

        int GetExpenseNum(Guid projectID, Guid contractID);

        void SaveExpenseBackup(ExpenseView expenseView, List<ConstructionContractEepenseBillView> saveList);

        void InsertApprovalExpense(ApprovalExpenseView approvalExpenseView);

        void DeleteExpenseProcessData(string expenseID);

        void WithdrawOrBackExpenseForRequestNode(string expenseID, string nodeCode);

        void WithdrawOrBackExpenseForOtherNode(string expenseID, string nodeCode, string nodeCodeStr);

        List<ContractExpenseView> GetContractExpenseList(string projectID, string correspondenceUnitStr, List<Guid> lstCorrespondenceUnit);

        List<ExpenseView> GetExpenseList(Guid contractID);

        OperationResult DeleteSelectExpense(string expenseID);

        #region 详细信息（支表一、二、三）
        List<VMExpenseFirstTopList> GetVMExpenseFirstTopList(string sectionID, int periodID);

        List<VMExpenseFirstBottomList> GetVMExpenseFirstBottomList(string sectionID, int periodID);

        List<VMExpenseFirstCutPayment> GetVMExpenseFirstCutPaymentList(string sectionID, int periodID);

        List<VMExpenseSecond> GetVMExpenseSecondList(string sectionID, int periodID);

        List<VMExpenseThirdList> GetVMExpenseThirdList(string sectionID, int periodID);

        List<VMEstimateData> GetVMEstimateDataList(string sectionID);

        UpdateConstructionContractEstimateView GetUpdateConstructionContractEstimate(string contractID, string periodID);
        #endregion

        #region 支表二 图表部分的支付数据
        List<VMQCYearMonth> GetVMQCYearMonth(string sectionID, int periodID);

        List<PointView> GetZFComplete(string sectionID, int periodID);
        #endregion

        #region 进度查询
        List<PointView> GetZFCompleteForMulContract(string projectID,List<string> lstContractID, string contractIDSQLWhere);
        #endregion

        List<ExpenseView> GetExpenseByProjectIDAndContractID(Guid projectID, Guid contractID);

        string GetExpensePayNum(Guid projectID, Guid contractID, int? ContractStages);

        void ReverseAudit(string expenseID, string nodeCode, string userName);
    }
}